'use strict';

const conn = require('../../libs/DB/Conn');
const _ = require('underscore');

module.exports = async function (params) {
    console.log(params);
    let agentIdList = params.agentIdList;
    let deleteSql = `UPDATE agent_file set delete_sign = 2 WHERE agent_id IN (?);
                    UPDATE domain_file set delete_sign = 2 WHERE agent_id IN (?);
                    UPDATE user_file set delete_sign = 2 WHERE agent_id IN (?) OR domain_id IN (SELECT domain_id FROM domain_file WHERE agent_id IN (?));`;
    await conn(deleteSql, [agentIdList, agentIdList,agentIdList,agentIdList]);
    return {success: true}
};